home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / haskell / glasgow / ghc-src.lha / ghc-0.16 / STARTUP-ghc.alpha < prev   
Text File  |  1993-07-13  |  3KB  |  84 lines

  1. #! /bin/sh
  2. #
  3. # I used this variant when messing around on an Alpha -- partain
  4. #
  5. # die quickly if anything goes astray...
  6. set -e
  7.  
  8. PROJECT=ghc
  9.  
  10. echo '*******************************************************************'
  11. echo "* A script to help you get $PROJECT going..."
  12. echo '*******************************************************************'
  13. echo '* I hope that you read the relevant documentation and tweaked the *'
  14. echo '* appropriate configuration files _BEFORE_ you started running    *'
  15. echo '* this!                                                           *'
  16. echo '*******************************************************************'
  17.  
  18. if [ $# != 1 ] ; then
  19.     echo ''
  20.     echo 'Please give exactly one argument, a "setup" name.'
  21.     echo 'Choices include (see install guide): std, full.'
  22.     exit 1
  23. fi
  24. # OK, I'll take that one...
  25. SETUP=$1
  26.  
  27. # figure out the absolute pathname of the "top" directory
  28. # (the one which has "mkworld", "nofib", "grasp-utils", etc., as subdirs)
  29. hardtop=`pwd`
  30. hardtop=`echo $hardtop | sed 's|^/tmp_mnt/|/|' | sed 's|^/export/|/|' | sed 's|^/grasp_tmp|/local/grasp_tmp|'`
  31. echo ''
  32. echo "*** I decided the top of your build tree is: $hardtop"
  33.  
  34. # make "mkworld", "literate", and "grasp-utils" (no special configuration)
  35.  
  36. #    make all the Makefiles first
  37.  
  38. for i in mkworld grasp-utils literate ; do
  39.     ( set -e;                                    \
  40.       cd $i ;                                    \
  41.       echo '' ;                                    \
  42.       echo "*** configuring $i ..." ;                        \
  43.       make -f Makefile.BOOT BOOT_DEFINES="-P none -S std -DTopDirPwd=$hardtop";    \
  44.       echo '' ;                                    \
  45.       echo "*** making Makefiles in $i ..." ;                    \
  46.       make Makefiles                                 \
  47.     )
  48. done
  49.  
  50. #    now make the dependencies and Real Stuff
  51.  
  52. for i in mkworld literate grasp-utils ; do
  53.     ( set -e;                                    \
  54.       cd $i ;                                    \
  55.       echo '' ;                                    \
  56.       echo "*** making make dependencies in $i ..." ;                \
  57.       make depend ;                                    \
  58.       echo '' ;                                    \
  59.       echo "*** making all in $i ..." ;                        \
  60.       make all                                    \
  61.     )
  62. done
  63.  
  64. # OK, now make the $PROJECT Makefiles (and the dependencies)
  65. cd $PROJECT
  66.  
  67. make -f Makefile.BOOT BOOT_DEFINES="-P $PROJECT -S $SETUP -C mkworld -DTopDirPwd=$hardtop"
  68.  
  69. echo ''
  70. echo "*** configuring $PROJECT project itself (it takes a while :-() ..."
  71. make Makefile
  72. make Makefiles
  73.  
  74. echo ''
  75. echo "*** adding Makefile dependencies for $PROJECT project ..."
  76. make depend
  77.  
  78. echo ''
  79. echo '*******************************************************************'
  80. echo "* Hallelujah! You should be able to proceed with $PROJECT, setup $SETUP."
  81. echo "* (Please consult the documentation.)"
  82. echo '*******************************************************************'
  83. exit 0
  84.